//
//  NSArray+safeAssignment.m
//  QiMingJieMing
//
//  Created by Gufs on 17/2/10.
//  Copyright © 2017年 yjh. All rights reserved.
//

#import "NSArray+safeAssignment.h"

@implementation NSArray (safeAssignment)

-(id)setSubscript:(NSInteger)subscript{
    if (subscript < [self count]) {
        return self[subscript];
    }
    return nil;
}

+(NSArray *)setSafeArr:(id)obj{
    if ([obj isKindOfClass:[NSArray class]]) {
        return obj;
    }
    return [NSArray array];
}

@end
